<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>个人博客后台管理系统</title>
    <link rel="stylesheet" href="__PUBLIC_ADMIN_DIR__/css/pintuer.css">
    <link rel="stylesheet" href="__PUBLIC_ADMIN_DIR__/css/admin.css">
    <script src="__PUBLIC_ADMIN_DIR__/js/jquery.js"></script>
    <script src="__PUBLIC_ADMIN_DIR__/js/pintuer.js"></script>
    <script src="__PUBLIC_ADMIN_DIR__/js/respond.js"></script>
    <script src="__PUBLIC_ADMIN_DIR__/js/admin.js"></script>
    <link type="image/x-icon" href="/favicon.ico" rel="shortcut icon" />
    <link href="/favicon.ico" rel="bookmark icon" />
    <style>
    	.ths{
    		font-size: 14px;
    	}
    	.THcheck{
    		margin-left: 10px;
    		margin-top: 6px;
    	}
    </style>
</head>

<body>
<script>
	//定义页面载入事件
	$(function(){
		//获取btnAdd按钮
		$('#btnAdd').bind('click',function(){
			// 添加分类的链接
			window.location.href = 'index.html';
		});
	});
</script>
<div class="admin">
	<form method="post" action="__CONTROLLER__/AllHandler">
    <div class="panel admin-panel">
    	<div class="panel-head"><strong>回收站</strong></div>
        <div class="padding border-bottom">
            <input type="button" class="button button-small checkall" name="id[]" checkfor="id[]" value="全选" />
            <input type="submit" id="AllDelete" name="AllDelete" class="button button-small border-yellow" value="批量删除" />
            <input type="submit" id="AllRestore" name="AllRestore" class="button button-small border-blue" value="批量还原" />
        </div>
        <table class="table table-hover ths">
		     <tr>
                <th width="60">选择</th>
                <th width="120">所属类别</th>
                <th width="240">分类名称</th>
                <th width="*">分类描述</th>
                <th width="100">操作</th>
            </tr>
            <foreach name='data' item='row'>
	            <tr>
	                <td><input type="checkbox" name="id[]" value="{$row.id}" class="THcheck" /></td>
	                <td><if condition="$row.cate_pid == 0">主类别<else/>{$row.level|str_repeat='-',###*2}{$row.pname}</if></td>
	                <td>{$row.cate_name}</td>
	                <td>{$row.cate_desc}</td>
	                <td>
	                    <a class="button border-blue button-little" href="{:U('restore',array('id'=>$row['id']))}">还原</a> 
	                    <a class="button border-yellow button-little" href="{:U('delete',array('id'=>$row['id']))}" onclick="return confirm('确认彻底删除吗?')">删除</a>
	                </td>
	            </tr>
            </foreach>
        </table>
    </div>
    </form>
</div>
</body>
</html>